<!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title>登录</title>  
    <link rel="stylesheet" href="__ROOT__/static/admin/css/pintuer.css">
    <link rel="stylesheet" href="__ROOT__/static/admin/css/admin.css">
    <script src="__ROOT__/static/admin/js/jquery.js"></script>
    <script src="__ROOT__/static/admin/js/pintuer.js"></script>
</head>
<body>
<div class="bg"></div>
<div class="container">
    <div class="line bouncein">
        <div class="xs6 xm4 xs3-move xm4-move">
            <div style="height:150px;"></div>
            <div class="media media-y margin-big-bottom">           
            </div>         
            <form action="{:url('index/login')}" method="post">
            <div class="panel loginbox">
                <div class="text-center margin-big padding-big-top"><h1>后台管理中心</h1></div>
                <div class="panel-body" style="padding:30px; padding-bottom:10px; padding-top:10px;">
                    <div class="form-group">
                        <div class="field field-icon-right">
                            <input type="text" value="{$user.username}" class="input input-big" name="name" placeholder="登录账号" data-validate="required:请填写账号" />
                            <span class="icon icon-user margin-small"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="field field-icon-right">
                            <input type="password" class="input input-big" value="{$user.pwd}" name="password" placeholder="登录密码" data-validate="required:请填写密码" />
                            <span class="icon icon-key margin-small"></span>
                        </div>
                    </div>
                    <!--<div class="form-group">
                        <div class="field">
                            <input type="text" id="phone" value="15928704741" class="input input-big" name="phone" placeholder="填写手机号码" data-validate="required:请填写手机号码" />
                           <h4 class="passcode" onclick="getYzm();" style="top:3px;width:100px;" >获取验证码</h4>
                            <span class="icon  margin-small" id="codemsg"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="field field-icon-right">
                            <input type="text" class="input input-big" name="code" value="123456" placeholder="手机验证码" data-validate="required:请填写手机验证码" />
                            <span class="icon  margin-small"></span>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="field field-icon-right">
                            <input type="checkbox" {if $user.remember==1}checked='checked'{/if} name="remember" />记住密码
                        </div>
                    </div>-->
                </div>
                <div style="padding:30px;"><input type="submit" class="button button-block bg-main text-big input-big" value="登录"></div>
            </div>
            </form>          
        </div>
    </div>
</div>
<script>
    function getYzm(){
        var phone=$("#phone").val();
        var configObj = {
            method:"post",   //数据的提交方式：get和post
            url:"{:url('getYzmAjax')}",   //数据的提交路劲
            async:false,   //是否支持异步刷新，默认是true
            data:"phone="+phone+"&pwd=",   //需要提交的数据
            dataType:"json" ,  //服务器返回数据的类型，例如xml,String,Json等
            success:function(result){
                console.log(result);
                $('#codemsg').html(result['msg']);
            },    //请求成功后的回调函数
            error:function(msg){
                console.log(msg);
            }   //请求失败后的回调函数
        }
        $.ajax(configObj);//通过$.ajax函数进行调用。
    }
</script>
</body>
</html>